Re: Re: Re: [campsite-support] constraint publishing date
  • Campsite is really cool, believe me. You can do what you need in
    different ways.

    1) By using constraints in articles list, for example:

    {{ list_articles name="articles" constraints="publish_date greater
    2009-03-27" ignore_issue=true }}
    {{ $campsite->article->title }}
    {{ /list_articles }}

    code above will print articles published after March 27th 2009.

    Exactly what you need Wink


    On Mon, Jan 11, 2010 at 1:50 PM, wrote:
    > Author: Terix
    > Link:
  • ... and... Another way to do it:

    2) By using conditionals inside articles list, for example:

    {{ list_articles name="article" ignore_issue=true }}
    {{ if $campsite->article->publish_date|camp_date_format:"%Y-%m-%d"
    > '2009-03-22' }}
    {{ $campsite->article->title }}
    {{ /if }}
    {{ /list_articles }}

    will list articles published after March 22nd 2009. This works, but
    loop could be unnecessarily long and comparisons have to be made for
    each article. However, knowing this can be very helpful in some
    scenarios. So, for what you need, solution in previous e-mail is the
    way to go.

    hope this helps...


    On Mon, Jan 11, 2010 at 2:26 PM, Holman Romero wrote:
    > Campsite is really cool, believe me.
  • I know that campsite is really awesome Smile and yes this is almost exactly what i need Smile what can i use to put "now" instead of 2009-03-27? Can i use {$smarty.now} ? Or what else?